﻿using DirectSell.Model.Query;
using DirectSell.Model.User;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Webdiyer.WebControls.Mvc;

namespace Direct.IDAL.User.Jurisdiction
{
    /// <summary>
    /// 用户升级仓储接口
    /// </summary>
    public interface IUserUpgradeRepository:IAbsRepository
    {
        /// <summary>
        /// 用户升级操作
        /// </summary>
        /// <param name="model"></param>
        /// <param name="hsTable"></param>
        void UpApply(UserUpGradeReq model, ref Hashtable hsTable);
        /// <summary>
        /// 计算差额
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<decimal> CalcAmount(UserUpGradeReq model);
        /// <summary>
        /// 是否重复提交
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
         Task<bool> IsRepeat(UserUpGradeReq model);
        /// <summary>
        /// 获取可以晋升的级别
        /// </summary>
        /// <param name="level"></param>
        /// <returns></returns>
        IList<MemberLevel> QueryMemberLevel(byte level);
        /// <summary>
        /// 会员升级记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<PagedList<UserUpgrade>> Upgraderecord(string usercode, int pageindex, int pagesize);
    }
}
